package io.demo.builders;

/**
 * @author create by zhangpengfei at 2021/9/29 17:56
 */

public class Soy extends CondimentDecorator{

    Beverage beverage;

    public Soy(Beverage beverage) {
        this.beverage = beverage;
        description = beverage.getDescription() + ", Soy";
    }

    @Override
    public double cost() {
        return 0.55 + beverage.cost();
    }
}
